package genericity;

// 一个接口两个泛型用逗号隔开
interface Function<T,R>{
	public R apply(T t);
}

class FunctionImpl implements Function<String,Integer>{
	@Override
	public Integer apply(String t) {
		return Integer.parseInt(t);
	}
}

class FunctionImpl2 implements Function<String,Boolean>{

	@Override
	public Boolean apply(String t) {
		return t.isEmpty();
	}

}


public class FunctionDemo {
	public static void main(String[] args) {
		
	}
}
